<?php

/* Reset the session variables and destroy the current session,
	logging the user out.
	*/

	include_once("session.php");
	include_once("connect_to_database.php");
	
	$user = mysql_real_escape_string($_POST['username']);
	mysql_query("UPDATE members SET color = NULL, isOnline = '0' WHERE username = '".$user."'");
	
	$_SESSION = array(); //unset session variables
	session_destroy();   //destroy session
?>
